#作业：判断从键盘的输入，忽略大小写，判断字母是否为回文


input_str = input("请从键盘进行输入：")
str1, str2 = "", ""

for char in input_str:
    if 'A' <= char <= 'Z':
        # 大写转小写
        char = chr(ord(char) + (ord('a') - ord('A')))

    if ('a' <= char <= 'z') or ('0' <= char <= '9'):
        str1 += char
        str2 = char + str2

print("str1 =", str1)
print("str2 =", str2)

if str1 == str2:
    print("该输入是一段回文！")
else:
    print("该输入不是回文！")